/** 存放所有健身房模块相关接口 */
import myaxios from "../MyAxios";
import URLENV from "@/http/BaseUrl";
const JSFURL = URLENV.JSFURL;

const GymApi = {
  /* 修改健身房信息 */
  update(params){
    let url = JSFURL + '/store/store_update'
    return myaxios.post(url,params)
  },

  /* 查询健身房列表 */
  queryAll(params){
    let url = JSFURL + '/store/storelist'
    return myaxios.get(url,params)
  },
  
  /**
   * 模糊查询健身房列表
   * @param {*} params 
   * @returns 
   */
  queryGymsByName(params){
    let url = JSFURL + '/store/byname'
    return myaxios.post(url,params)
  },

  /* 添加健身房 */
  add(params){
    let url = JSFURL + '/store/store_add'
    return myaxios.post(url,params)
  },

  /**
   * 删除电影
   * @param {object} params {store_id}  
   */
  delete(params){
    let url = JSFURL + '/store/store_del'
    return myaxios.post(url,params)
  },

  /**
   * 通过ID查询健身房信息
   * @param {object} params 
   */
  queryById(params){
    let url = JSFURL + '/store/bystore_id'
    return myaxios.get(url,params)
  }

}

export default GymApi